UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bRGgd0vSuS0Ym/V4mTGJeO5Jqp6cpvFHh3xSR53gFCI=' 
WHERE 
  key_id = 'caecdcaede9f3f7a732fc8fdf39b330504e94d02c6eafe27092db5c869bb1188' 
  AND (
    token = 'bRGgd0vSuS0Ym/V4mTGJeO5Jqp6cpvFHh3xSR53gFCI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058