UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+904JtRSppsUFHoKvgQJKCbzHKUhUzpaneMW9SlzWMo='
WHERE
key_id = '6d6a97c31020d9b84d6bae6a2476086dea67baf355f3acdedbbf2faba2940c36'
AND (
token = '+904JtRSppsUFHoKvgQJKCbzHKUhUzpaneMW9SlzWMo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)