UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QLkWKnYvFMBL85NB8fBaYYqc3E6P2rRDaD9PjPOrFzc='
WHERE
key_id = '2fb94708c3233de972b8e8e5bdb2151b50495767c6c0e18f95e91a7c47f603a4'
AND (
token = 'QLkWKnYvFMBL85NB8fBaYYqc3E6P2rRDaD9PjPOrFzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)