UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+LBR230gztu4+ohxXQmWIHwzFytAjhSfF/MHOpMNViY='
WHERE
key_id = '7a406bccfe4ba21fe7e4364bd2f4e55408ed83261c9e18e0e09ddb75a952e08e'
AND (
token = '+LBR230gztu4+ohxXQmWIHwzFytAjhSfF/MHOpMNViY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)