UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qZqzFthcEl3b0p+UvcI8dWA+4MKjxFeGkdeSlUt5nts=' 
WHERE 
  key_id = '0ee784c66e61c410bbdd973f3dee37dd1dc26bab199ddcdca1e33fb5b16ec9a6' 
  AND (
    token = 'qZqzFthcEl3b0p+UvcI8dWA+4MKjxFeGkdeSlUt5nts=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018