UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4UqgvHwM+ID6lnsLGGJQPR0La2b56PgOV1Bs8kwaeNo='
WHERE
key_id = '95fe16f5f6014479eecbfa77a133ad2e506630d5e363a3878f71034ccdb9d249'
AND (
token = '4UqgvHwM+ID6lnsLGGJQPR0La2b56PgOV1Bs8kwaeNo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)