UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+nfVPm/ud3XGMfRANTS2oVZr4pnlIziMN74AiHMlitk='
WHERE
key_id = '9431db713ee78df4b23d7312e5a9dc39f9f44b16cf47c05ebfe3af3cba189610'
AND (
token = '+nfVPm/ud3XGMfRANTS2oVZr4pnlIziMN74AiHMlitk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)