UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7m1bIH/hetncoCuUPE3Kk3sSiyyMkk+auUeT25ysC5U='
WHERE
key_id = 'd1f99089593f80adcb5fd8f11d9ae39827a4d637ca7f3a27aad13d6cac8ad106'
AND (
token = '7m1bIH/hetncoCuUPE3Kk3sSiyyMkk+auUeT25ysC5U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)