UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+Yn3J7D8Oy48PgfU1z6NHvqsA08MLv2/rTHsFocSWEc=' 
WHERE 
  key_id = 'a3ee73c4d80bfd91904725af0660edc7e19adb68e1a6f81c9c45c458f6e0c005' 
  AND (
    token = '+Yn3J7D8Oy48PgfU1z6NHvqsA08MLv2/rTHsFocSWEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053