UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5zd3nxM3vtSoX3ILN5aWxAzmrzo+Vkw/rhYuZ61bI5g='
WHERE
key_id = 'd818b553460a7f43a4d2b46dfe048d8b9f7a84a921bf039da5a9e5ab64d4fdd3'
AND (
token = '5zd3nxM3vtSoX3ILN5aWxAzmrzo+Vkw/rhYuZ61bI5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)