UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BUOKr7jy4Mr4Tf/MbpGHk/4JMiIt0FhKeg8I7ZvvrFo='
WHERE
key_id = '64ab947e40e495b4ffff46f2a6253719759b736968fbac19ad6aeb6e426f703e'
AND (
token = 'BUOKr7jy4Mr4Tf/MbpGHk/4JMiIt0FhKeg8I7ZvvrFo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)