UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FSEJJr+QzCQZaLNyBlm/TemqP2k0bbu1WvoEIn7jdpE='
WHERE
key_id = '00dfdc392ff522bde605e4799366c6028651c59a4cd51d3ef6a2269449d2977c'
AND (
token = 'FSEJJr+QzCQZaLNyBlm/TemqP2k0bbu1WvoEIn7jdpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)