UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'awWNDWMXN+Es7NJxrKL9VMedokKzUZuzlZU7ELt8f88='
WHERE
key_id = '09a66f83c092fbfd7b943645e56da323e5e211d340851e9b4ddf1b0c6d9943bd'
AND (
token = 'awWNDWMXN+Es7NJxrKL9VMedokKzUZuzlZU7ELt8f88='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)