UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OEdoA9RiiPAwGAbY+ncQ1skjkGC1EW4E6T/QwtNuZLQ=' 
WHERE 
  key_id = '1fdf90e546519db3c48ee114d6ca25e7e002a067d1919e2aaffca81b4e351f7c' 
  AND (
    token = 'OEdoA9RiiPAwGAbY+ncQ1skjkGC1EW4E6T/QwtNuZLQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044