UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pCmSow954kbEQ/frckuXDpfm9wDx87mmS2C/bSsHD9E=' 
WHERE 
  key_id = 'fe5d28d570e873f7bbe26a6a614c2d85070a937a53b56daddc3e5403a520d4b3' 
  AND (
    token = 'pCmSow954kbEQ/frckuXDpfm9wDx87mmS2C/bSsHD9E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021