UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uVuXkrJsyGoBiRDXtFk3rpI+eprj8up8ZZp3UDqLIsQ='
WHERE
key_id = '4beedf14563c6bf00495ab2df6f83fc37b84ccbd45b708660ab1b17b2a564116'
AND (
token = 'uVuXkrJsyGoBiRDXtFk3rpI+eprj8up8ZZp3UDqLIsQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)