UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XSEKIttEr0xrTB4id1WHUCINpKEVP975XmYojDuZOXk='
WHERE
key_id = 'fda4febd864b677814e140bb22e8a1131d9933e5035030728737b5de0d2ee0f1'
AND (
token = 'XSEKIttEr0xrTB4id1WHUCINpKEVP975XmYojDuZOXk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)