UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F/54zNPMG9mLpZouKn4HYk32pJATyVh2sByOhK4Jv4o='
WHERE
key_id = '69b1059b8219447426fdb083825c934afb87a8097c8dd06f7402dded284f3d5e'
AND (
token = 'F/54zNPMG9mLpZouKn4HYk32pJATyVh2sByOhK4Jv4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)