UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4YXDQiFWn0tI6+MWopvQpktZDPFR4gPcvnnHKSBKZ0c='
WHERE
key_id = '011b6fab8173de268cf807af572f7d28ab0da5d9296e7fdd848b9fda5f5ef873'
AND (
token = '4YXDQiFWn0tI6+MWopvQpktZDPFR4gPcvnnHKSBKZ0c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)