UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7zNtkWIKj1ttZ5M6Ob8koYq3GXSHaRJud+rz4pjeNbk=' 
WHERE 
  key_id = '2f4cf0ee7f2d458d08238e932fafb00d9a3689f04ce5a9d8f9361964485686c2' 
  AND (
    token = '7zNtkWIKj1ttZ5M6Ob8koYq3GXSHaRJud+rz4pjeNbk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015