UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aOaxQzOhRHHVRFwCV2vsUVCWTaWru92UvOKnLbNXl5I='
WHERE
key_id = 'acc26d6ce7956156eee2e3986357fb3ef2eb4d1008b31c2640c5771553cea8f3'
AND (
token = 'aOaxQzOhRHHVRFwCV2vsUVCWTaWru92UvOKnLbNXl5I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)