UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8H54uOUMOsKH+jCV9BLFQ2ykOQDMPT2Ccwz01p/2yHA=' 
WHERE 
  key_id = '5919cbf73d4e8fed2b326e6afd7981ffc6d553f51b129267aea535691afeb55d' 
  AND (
    token = '8H54uOUMOsKH+jCV9BLFQ2ykOQDMPT2Ccwz01p/2yHA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050