UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/9UgH17CTXmpnIurUwkJjCxu2slDC0P43mkabhBFnVM=' 
WHERE 
  key_id = '95080bdae6be549e2f3c76708c65b7141a88a31915fec2e7cf2e60a504bcdf30' 
  AND (
    token = '/9UgH17CTXmpnIurUwkJjCxu2slDC0P43mkabhBFnVM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021