UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rq/nMwVklRFa1cL6J76r700Ke7owbncj2VONGo94cQ8='
WHERE
key_id = '93d724215748afa844f593b26fe2805f5cc1f827752d9b9486e518321a260195'
AND (
token = 'rq/nMwVklRFa1cL6J76r700Ke7owbncj2VONGo94cQ8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)