UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0VB6dnh5bNFSa1P5yxPK29tmmcZC1hAk1fzD998Ehtk='
WHERE
key_id = '19bc5711c6d8763a42161e009d2c46f5aaf8c03f1b8d706bfac2db1d138b3fdb'
AND (
token = '0VB6dnh5bNFSa1P5yxPK29tmmcZC1hAk1fzD998Ehtk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)