UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CIhYdnRw/XA5b/j8/V4PXWUKgB/ZI3208fdLcmVCBUs=' 
WHERE 
  key_id = 'd7e9cb8b0b8094d1e355b4d5e0db1fc84fdbbd5258497b201dabe0f3d3a420db' 
  AND (
    token = 'CIhYdnRw/XA5b/j8/V4PXWUKgB/ZI3208fdLcmVCBUs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041