UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Tfpt3CCYdBW3eYuaUle+shvXfFezklEQ/ehz6CmOSkc='
WHERE
key_id = '9c0b4459ddb51917ab5e8bc7ddfa45787e5372fb16dc28ad3ddeb85cd295174e'
AND (
token = 'Tfpt3CCYdBW3eYuaUle+shvXfFezklEQ/ehz6CmOSkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)