UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UZ+SyAAzeK8JtHHZpGb+Ozq4vrvN/zj/0Y3fSvEJa9w=' 
WHERE 
  key_id = 'fd436579af56f3cb83b8c94cf74305fe6f6217f7f1aa4f62e8f10ef20d02a1f1' 
  AND (
    token = 'UZ+SyAAzeK8JtHHZpGb+Ozq4vrvN/zj/0Y3fSvEJa9w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033