UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wt14jhaUaAu7vxIKoO0HTD9FBT8QR4tfKlZRvlurie0='
WHERE
key_id = '60b97e0d15ab9179d605d9998296403675288304f52bbd24844fda168b57bda2'
AND (
token = 'Wt14jhaUaAu7vxIKoO0HTD9FBT8QR4tfKlZRvlurie0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)