UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yjx5seJpRz4G2m+vlcbFd45biDpITWwLlCMfqOoatow='
WHERE
key_id = '293794c7cd03e27dfba9a8fad704359a99543d16e483a30c63d5eb158880a35c'
AND (
token = 'Yjx5seJpRz4G2m+vlcbFd45biDpITWwLlCMfqOoatow='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)