UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Kzqcqw/Jqts0QTh/3cC6I57kgyb/ETcpjknv4TimQE='
WHERE
key_id = 'a81356fbcbd943d86545620c95dff7d4ed5a4cdf3d12988647b113367e24f8ae'
AND (
token = '+Kzqcqw/Jqts0QTh/3cC6I57kgyb/ETcpjknv4TimQE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)