UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oBIFAimJTuSXeBr2ZuvtoSymBudnA/4nnXt5JKuo2I4='
WHERE
key_id = '35cd4e4b03dc9cb5c25ec8ff44a734c5d575786f7b44baf3bcf28fc3a4dcfc6a'
AND (
token = 'oBIFAimJTuSXeBr2ZuvtoSymBudnA/4nnXt5JKuo2I4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)