UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9u78jX60/v/cZZqiMHuMPdqb/3j8uEAXRX/K2/tnVSU='
WHERE
key_id = '672a63e1f7f831bd57284e0ffc452c203dda0605a893aeb14dc191065a7a17ae'
AND (
token = '9u78jX60/v/cZZqiMHuMPdqb/3j8uEAXRX/K2/tnVSU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)