UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EpnUf3CHm/VuOGThdv/PbSsZPimUIITHUytyQsSWZQU='
WHERE
key_id = 'eccbca5cf54127125e8d388f8560d7c334d63ec351e95868f52cdac479fe0d0e'
AND (
token = 'EpnUf3CHm/VuOGThdv/PbSsZPimUIITHUytyQsSWZQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)