UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'usNS0B70+s1YNR+EOxyD+CwZyGW2B0WP0/OTE3/2Ggs=' 
WHERE 
  key_id = 'ea67e1ae26c1eed8ba3bf1107f0294154f25f8a03186051da272439c3f4b372c' 
  AND (
    token = 'usNS0B70+s1YNR+EOxyD+CwZyGW2B0WP0/OTE3/2Ggs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060