UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zK0oVZsyyzHMb6B9JRWR26A6b/HtZ9XJtua6rQV4TzQ='
WHERE
key_id = 'e9b03127b8bc606457d0beaa356bdf3b0b3648239b093cf871d5cd0a48dc328e'
AND (
token = 'zK0oVZsyyzHMb6B9JRWR26A6b/HtZ9XJtua6rQV4TzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)