UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v3x2dKyOC8L/z8rTRnViGHCHXNO6auV70Sp6nym6FQg='
WHERE
key_id = '5312ad33d989994a4e69db7cd37b60d2a0a1bbfa3fce08fa638fb80312f3bfae'
AND (
token = 'v3x2dKyOC8L/z8rTRnViGHCHXNO6auV70Sp6nym6FQg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)