UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LIhyPwNf/Zr9gLphQ2udEr9z5hus87yFQobZaUjErp0='
WHERE
key_id = '2f72164531644efc09399b3550018944bbc977738a509f518c9d45ffdc4adcd6'
AND (
token = 'LIhyPwNf/Zr9gLphQ2udEr9z5hus87yFQobZaUjErp0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)