UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'khhngGZJlLk5RLIEgyi1RwtZgSerAu4EUBoacg14oqM='
WHERE
key_id = '7bf27c7878af0856758ba843e9ff566e17dbcfde5959c62bd0d9eb3dda174b81'
AND (
token = 'khhngGZJlLk5RLIEgyi1RwtZgSerAu4EUBoacg14oqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)