UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Dboo3Wi9WVim0uX5gxSjO9Iva5iJZumZvfK072JlMw='
WHERE
key_id = '6302615d961966fd76e62f5cbc36a4d1a126c6c476c09d10762ae0beea49fbcd'
AND (
token = '/Dboo3Wi9WVim0uX5gxSjO9Iva5iJZumZvfK072JlMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)