UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+83KsEXLSMiIfLGaHYYLvHng3btY7tHX5RybqrPwAgI='
WHERE
key_id = 'c5e944a2b5c25d0bedc0c74283b7f70019c545c7aca45ae7dd45b87dfc5f93ae'
AND (
token = '+83KsEXLSMiIfLGaHYYLvHng3btY7tHX5RybqrPwAgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)