UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HtI+S1M4rhuYFBbFzZfw1alF6Gr9GB9Kr/5nZtLtb2A=' 
WHERE 
  key_id = '0259dae32797bbbd783943337122d1b7a30e0c0acf3a6d2ad9bb43c00a130e34' 
  AND (
    token = 'HtI+S1M4rhuYFBbFzZfw1alF6Gr9GB9Kr/5nZtLtb2A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00111