UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jvtNhtFUB/QnHGpLzSR2Me+o4TvIOsPz0j1+lfokRL8='
WHERE
key_id = '36dacff21785e80b519eadefc29b20481fdc8a0eeff62027560e900c70ac6acc'
AND (
token = 'jvtNhtFUB/QnHGpLzSR2Me+o4TvIOsPz0j1+lfokRL8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)