UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qyhvwHVPD6P2IQUX/AazEXMu8SMLwR3mcLSaCpDwgEQ='
WHERE
key_id = '956d048d555d5bef1afffde3d0ce1b05ad57968ab652409dd2cc6b1f83cf0161'
AND (
token = 'qyhvwHVPD6P2IQUX/AazEXMu8SMLwR3mcLSaCpDwgEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)