UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+cODiEV4Ki7HQKvgXYBLEEo15YM1zkWTiFnFf8lfGzg=' 
WHERE 
  key_id = 'a76eb124d6cc905e9b30a34df33e149a5a50cb7527e3e0ba472da4421f3091e3' 
  AND (
    token = '+cODiEV4Ki7HQKvgXYBLEEo15YM1zkWTiFnFf8lfGzg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027