UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vuxugZcFugQ27DQqEHjNqEywu4FHaKS1YmJNSaDb/BM='
WHERE
key_id = '866f5787f0711507b2dc6fbcb5b144317f2be0e495b659fb708e2d09d7a23a70'
AND (
token = 'vuxugZcFugQ27DQqEHjNqEywu4FHaKS1YmJNSaDb/BM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)