UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '272CIwXFxR1992fUkhaBAbr4Mix2mrp7Biv9ed8IJQU='
WHERE
key_id = 'a62ae7eabf1b40196e5ab20a6c725fc29e9cb9315041bfd5ed3622ebd5c8b4a6'
AND (
token = '272CIwXFxR1992fUkhaBAbr4Mix2mrp7Biv9ed8IJQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)