UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JeNXZWYROyEeMhSiri1QeugxA0wAP9Wme3iuvSyU/0I='
WHERE
key_id = 'b28b0de99e80b550bedbf49bfa6a030e018cb573cd5d1c001e56dfd352734822'
AND (
token = 'JeNXZWYROyEeMhSiri1QeugxA0wAP9Wme3iuvSyU/0I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)