UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OAjKUCH2djGQ7mluB3opHNVOj2OKL7AyF8Xvt3gbbgs='
WHERE
key_id = '8dd1834bab10c5236258df9da02269ba2255f711a2825ddcc761f0060bfba9be'
AND (
token = 'OAjKUCH2djGQ7mluB3opHNVOj2OKL7AyF8Xvt3gbbgs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)